Option Explicit
Sub Q_Sample044()
    ']wޥζ Windows Script Host Object Model
    Dim myWsh   As IWshRuntimeLibrary.WshShell
    Dim myExec  As IWshRuntimeLibrary.WshExec
    Dim myTimer As Single
    Set myWsh = CreateObject("Wscript.Shell")
    Set myExec = myWsh.Exec("Notepad")		'wnҰʪε{
    myTimer = Timer + 5					'wɶ
    Do Until myTimer < Timer
        DoEvents
    Loop
    myExec.Terminate
    Set myExec = Nothing				'
    Set myWsh = Nothing
End Sub
